package com.riguz.forks.framework.db;

import java.sql.SQLException;

public class DbException extends RuntimeException {
    private static final long  serialVersionUID = -7738096003901087139L;
    private final SQLException sqlException;

    public DbException(SQLException sqlException, String poolName, String sql) {
        super(sqlException.getMessage() + "; Pool Name= " + poolName + "; SQL= " + sql);
        this.sqlException = sqlException;
    }

    public SQLException getSqlException() {
        return sqlException;
    }
}
